﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using Model;

namespace GataBaseSys
{
    public partial class UserTian : System.Web.UI.Page
    {
        GataBaseBLL bll = new GataBaseBLL();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            UserInfo info = new UserInfo();
           /* info.UserCode = Convert.ToInt32(this.lblCode.Value);*///编号记录
            info.UserName = this.username.Value.Trim();//姓名录入
            if (this.rnan.Checked == true)//男女按钮选中
            {
                info.UserGender = "男";
            }
            else if (this.rnv.Checked == true)
            {
                info.UserGender = "女";
            }
            info.UserCard = this.usershen.Value.Trim();//身份证号码
            info.UserTelephone = this.userphone.Value.Trim();//电话号码
            /*info.UserBalance = Convert.ToDecimal(this.txtMoney.Text.Trim());*///持有金额
            info.UserMailbox = this.email.Value.Trim();//电子邮箱
            //if (this.RadGrand.Checked == true)
            //{
            //    info.UserState = "普通用户";
            //}
            info.UserState = this.DropDownList1.SelectedItem.Text;
            info.UserCode = Convert.ToInt32(Session["uid"]);
            if (bll.Identity(info))
            {
                Response.Write("<script>alert('身份信息完善成功')</script>");
                Response.Redirect("UsenCha.aspx");
            }
            else
            {
                Response.Write("<script>alert('身份信息注册失败')</script>");
            }
        }
    }
}